#!/usr/bin/env bash

# ===> 172.17.8.110

# /opt/bin/kube-apiserver --logtostderr=true --v=0 --etcd-servers=http://172.17.8.110:2379 --advertise-address=172.17.8.110 --bind-address=172.17.8.110 --insecure-bind-address=172.17.8.110 --allow-privileged=true --service-cluster-ip-range=172.17.0.0/16 --admission-control=ServiceAccount,NamespaceLifecycle,NamespaceExists,LimitRanger,ResourceQuota --authorization-mode=Node,RBAC --runtime-config=rbac.authorization.k8s.io/v1beta1 --kubelet-https=true --enable-bootstrap-token-auth --token-auth-file=/etc/kubernetes/token.csv --service-node-port-range=30000-32767 --tls-cert-file=/etc/kubernetes/ssl/kubernetes.pem --tls-private-key-file=/etc/kubernetes/ssl/kubernetes-key.pem --client-ca-file=/etc/kubernetes/ssl/ca.pem --enable-swagger-ui=true --apiserver-count=3 --audit-log-maxage=30 --audit-log-maxbackup=3 --audit-log-maxsize=100 --audit-log-path=/var/lib/audit.log --event-ttl=1h --allow-privileged=true


curl -v https://172.17.8.110:6443/api/v1/nodes --cert /etc/kubernetes/ssl/admin.pem --key /etc/kubernetes/ssl/admin-key.pem --cacert /etc/kubernetes/ssl/ca.pem



#curl -v https://172.17.8.110:6443/swaggerapi  --cert /srv/kubernetes/cm_client.pem --key /srv/kubernetes/cm_client_key.pem --cacert /srv/kubernetes/ca.pem
#
#curl -v https://172.17.8.110:6443/api/v1/nodes --cert /srv/kubernetes/cm_client.pem --key /srv/kubernetes/cm_client_key.pem --cacert /srv/kubernetes/ca.pem
#
#
#curl -vk https://172.17.8.110:6443/swaggerapi  --cert /etc/kubernetes/ssl/admin.pem --key /etc/kubernetes/ssl/admin-key.pem --cacert /etc/kubernetes/ssl/ca.pem
#
#
#curl -v https://172.17.8.101:6443/api/v1/nodes --cert /etc/kubernetes/ssl/admin.pem --key /etc/kubernetes/ssl/admin-key.pem --cacert /etc/kubernetes/ssl/ca.pem
#
#/opt/bin/kube-apiserver --logtostderr=true --v=0 --etcd-servers=http://172.17.8.110:2379 --advertise-address=172.17.8.110 --bind-address=172.17.8.110 --insecure-bind-address=172.17.8.110 --allow-privileged=true --service-cluster-ip-range=172.17.0.0/16 --admission-control=ServiceAccount,NamespaceLifecycle,NamespaceExists,LimitRanger,ResourceQuota  --kubelet-https=true --enable-bootstrap-token-auth --token-auth-file=/etc/kubernetes/token.csv --service-node-port-range=30000-32767 --tls-cert-file=/etc/kubernetes/ssl/kubernetes.pem --tls-private-key-file=/etc/kubernetes/ssl/kubernetes-key.pem --client-ca-file=/etc/kubernetes/ssl/ca.pem --service-account-key-file=/etc/kubernetes/ssl/ca-key.pem --enable-swagger-ui=true --apiserver-count=3 --audit-log-maxage=30 --audit-log-maxbackup=3 --audit-log-maxsize=100 --audit-log-path=/var/lib/audit.log --event-ttl=1h --allow-privileged=true
#
#
#
#/opt/bin/kube-apiserver --logtostderr=true --v=0 --etcd-servers=http://172.17.8.110:2379 --advertise-address=172.17.8.110 --bind-address=172.17.8.110 --insecure-bind-address=172.17.8.110 --allow-privileged=true --service-cluster-ip-range=172.17.0.0/16 --admission-control=ServiceAccount,NamespaceLifecycle,NamespaceExists,LimitRanger,ResourceQuota --authorization-mode=Node,RBAC --runtime-config=rbac.authorization.k8s.io/v1beta1 --kubelet-https=true --enable-bootstrap-token-auth --token-auth-file=/etc/kubernetes/token.csv --service-node-port-range=30000-32767 --tls-cert-file=/etc/kubernetes/ssl/kubernetes.pem --tls-private-key-file=/etc/kubernetes/ssl/kubernetes-key.pem --client-ca-file=/etc/kubernetes/ssl/ca.pem --service-account-key-file=/etc/kubernetes/ssl/ca-key.pem --enable-swagger-ui=true --apiserver-count=3 --audit-log-maxage=30 --audit-log-maxbackup=3 --audit-log-maxsize=100 --audit-log-path=/var/lib/audit.log --event-ttl=1h --allow-privileged=true
#
#curl -v https://172.17.8.110:6443/api/v1/nodes --cert /etc/kubernetes/ssl/admin.pem --key /etc/kubernetes/ssl/admin-key.pem --cacert /etc/kubernetes/ssl/ca.pem


/opt/bin/kube-apiserver --logtostderr=true --v=0 --etcd-servers=http://172.17.8.110:2379 --advertise-address=172.17.8.110 --bind-address=0.0.0.0  --insecure-bind-address=0.0.0.0  --allow-privileged=true --service-cluster-ip-range=172.17.0.0/16 --admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,ResourceQuota --authorization-mode=Node,RBAC --runtime-config=rbac.authorization.k8s.io/v1beta1 --kubelet-https=true --enable-bootstrap-token-auth --token-auth-file=/etc/kubernetes/token.csv --service-node-port-range=30000-32767 --tls-cert-file=/etc/kubernetes/ssl/kubernetes.pem --tls-private-key-file=/etc/kubernetes/ssl/kubernetes-key.pem --client-ca-file=/etc/kubernetes/ssl/ca.pem --service-account-key-file=/etc/kubernetes/ssl/ca-key.pem --enable-swagger-ui=true --apiserver-count=3 --audit-log-maxage=30 --audit-log-maxbackup=3 --audit-log-maxsize=100 --audit-log-path=/var/lib/audit.log --event-ttl=1h --allow-privileged=true